#include <bits/stdc++.h>

using namespace std;

int main_1085_1()
{
    long long N,p;
    scanf("%lld%lld",&N,&p);
    long long sequence[N]= {0};
    for (long long i=0; i<N ; ++i )
    {
        scanf("%lld",&sequence[i]);
    }
    sort(sequence,sequence+N);
    long long max_min_len=1;
    for (long long i=0; i<N ; ++i )
    {
        long long j=upper_bound(sequence+i+1,sequence+N,p*sequence[i])-sequence;
        if (j-i>max_min_len)
        {
            max_min_len=j-i;
        }
    }
    printf("%lld",max_min_len);
    return 0;
}
